package day3.demo5_pro;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.Reader;
import java.io.Writer;
import java.sql.Date;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.Properties;
import java.util.Set;

public class Test2 {
    public static void main(String[] args) throws Exception{
        Properties p = new Properties();
        Reader r = new FileReader("datas/1.properties");
        p.load(r);
        Set<?> keys = p.keySet();
        for (Object k : keys) {

            System.out.println(k + ":" + p.get(k));
        }

        p.setProperty("a1","34");
        Writer w = new FileWriter("datas/1.properties");
        p.store(w,null);
    }
}
